#include <QtGui/QApplication>
#include <QtCore/QTextCodec>
#include "feig.h"
#include "msgdlgmng.h"
#include "FeiGtrayIcon.h"


int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));
	FeiG w;
	w.show();
	FeiGtrayIcon trayIcon;
	if(!QObject::connect(w.getMsgList(),SIGNAL(setAlert(bool)),&trayIcon,SLOT(setAlert(bool))))
	{
		exit(0);
	}
	if(!QObject::connect(&trayIcon,SIGNAL(postMsg()),w.getMsgList(),SLOT(postMsg())))
	{
		exit(0);
	}

	return a.exec();
}
